#include "main.h"

void fun1_face()
{
    // 背景
    glColor3b(0, 50, 50);

    glBegin(GL_POLYGON);
    glVertex2f(-100, 100);
    glVertex2f(-100, -100);
    glVertex2f(100,-100);
    glVertex2f(100, 100);
    glEnd();
    // 脸框
    glColor3b(100, 99, 2);
    glLineWidth(1);
    glBegin(GL_LINES);
    glVertex2f(-50, 50);
    glVertex2f(-40, -50);
    //
    glVertex2f(-40, -50);
    glVertex2f(-5, -70);
    //
    glVertex2f(-5, -70);
    glVertex2f(40, -50);
    //
    glVertex2f(40, -50);
    glVertex2f(50, 50);
    glEnd();
    // glFlush();
    //头发
    glColor3b(255, 255, 255);
    glBegin(GL_TRIANGLE_FAN);
    glVertex2f(40, 90);
    glVertex2f(-50, 80);
    glVertex2f(-80, 30);
    glVertex2f(10, 50);
    glVertex2f(20, 30);
    glVertex2f(50, 50);
    glVertex2f(80, 40);
    glEnd();

    // 眉毛
    glLineWidth(3);
    glBegin(GL_LINES);
    glVertex2f(-40, 30);
    glVertex2f(-10, 20);
    glVertex2f(10, 20);
    glVertex2f(40, 30);
    glEnd();

    // 眼睛
    glColor3b(49, 20, 47);

    glBegin(GL_POLYGON);
    glVertex2f(-25, 12);
    glVertex2f(-25, 18);
    glVertex2f(-31, 18);
    glVertex2f(-31, 12);
    glEnd();

    glBegin(GL_POLYGON);
    glVertex2f(25, 12);
    glVertex2f(25, 18);
    glVertex2f(31, 18);
    glVertex2f(31, 12);
    glEnd();

    // 鼻子
    glColor3b(100, 99, 2);
    glBegin(GL_TRIANGLES);
    glVertex2f(2, 10);
    glVertex2f(-10, -30);
    glVertex2f(10, -30);
    glEnd();

    // 嘴
    glColor3b(98, 0, 0);

    glBegin(GL_POLYGON);
    glVertex2f(-20, -45);
    glVertex2f(-10, -55);
    glVertex2f(10, -55);
    glVertex2f(20, -45);
    glEnd();
}
